package hsh.xun;
import java.util.Scanner;
public class shb {
    public static void main(String[] args){
        double mobile = 7988.0;
        double mobile1 = mobile-1500;
        double mobile2 = mobile*0.8;
        Scanner sc = new Scanner(System.in);
        System .out.println("选择以旧换新输入1，选择交给店家打折输入2");
        int money = sc.nextInt();
        switch(money ){
            case 1: System .out.println(mobile1 = mobile-1500);
            break;
            case 2:  System .out.println(mobile2 = mobile*0.8);
              break;
        }
        if(mobile1>mobile2){
            System .out.println("选择交给店家打折更划算");

        }
        else if(mobile1<mobile2){
            System .out.println("选择以旧换更划算");
        }
        else if(mobile1==mobile2){
            System .out.println("选择以旧换新和交给店家打折的购买价格是一样的");
        }
    }
}
